#include <fstream>

int main() 
{
	const int dx[4] = {1, 0, -1, 0};
	const int dy[4] = {0, 1, 0, -1};

	std::ifstream input("in.txt");
	std::ofstream output("out.txt");
	
	int n;

	input >> n;

	int x = 0, y = 0;
	int k = 1;
	int t = 0;
	int j = 0;

	for (int i = 0; i < n; i++) 
	{
		output << x << ' ' << y << '\n';
		if (t == 2) 
		{
			k++;
			t = 0;
		}
		
		x += dx[j]*k;
		y += dy[j]*k;

		j = (j + 1) % 4;
		t++;
	}

	return 0;
}